home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4804 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.4 KB  |  57 lines

  1. Path: ias_ppp0129.iamerica.net!fdbrown
  2. From: fdbrown@iamerica.net (David Brown)
  3. Newsgroups: comp.lang.c
  4. Subject: Need Help..................spawnv error!
  5. Date: Tue, 6 Feb 1996 22:06:54 -0500
  6. Organization: iAmerica, Inc.
  7. Message-ID: <fdbrown.3.010813B0@iamerica.net>
  8. NNTP-Posting-Host: ias_ppp0129.iamerica.net
  9. X-Newsreader: Trumpet for Windows [Version 1.0 Rev B]
  10.  
  11.  
  12. I need a little help.  I am writing a DOS program that does the following:
  13.  
  14. When first executed the program calls up a main menu with a choice of several 
  15. ascii text files to read.  Upon making a choice..........the screen clears and 
  16. a border is drawn around the outside edge of the screen and a menubar comes up 
  17. at the bottom of the screen with several choices, (to exit, page forward, page 
  18. back and etc.).  The text shows up inside the border and you can scroll 
  19. anywhere in the text you want to.  My problem comes in when I execute the 
  20. program in the beginning and I call an executable file from this main menu.
  21.  
  22. This is when I get "spawnv error.....Not Enough Memory".  I am using Borland 
  23. International Turbo C++ Version 3.0 for DOS....but I am programming this 
  24. strictly in C.  This program is going to be used as a tutorial for work.  A 
  25. student will be able to choose one of several text files to read on a given 
  26. subject and when he is through he can exit back to the main menu and choose 
  27. the option to take a test.  This test is a separate program that I wrote and 
  28. it is an executable file......not part of this tutorial I am coding.  I 
  29. thought it would be easier to call the executable file from this menu but I 
  30. keep getting the aforementioned spawnv error.
  31.  
  32. This is how I am calling the file from the main menu:
  33.  
  34. case 'G':    spawnv( P_WAIT, "AB_QUEST.EXE", argv);
  35.            if( errno )
  36.                  perror( "spawnv error" );
  37.                         exit(1);
  38.  
  39. I am also using the following in the code:
  40.  
  41. void menu(int argc, char *argv[ ] )
  42.  
  43. char *arguments[ ] = { "" };
  44.  
  45. I am not running Windows.  I work in DOS and this is strictly a program 
  46. written for DOS and I am running 8 megs of memory.  If you have an idea that 
  47. will solve my problem I'd forever be in your debt.  Thanks in advance.  
  48. Please post the answer here or if you'd prefer please send Email to:
  49.  
  50.                                       fdbrown@iamerica.net
  51.  
  52. David Brown
  53. West Monroe, La.
  54.  
  55. (PS) - If more code fragments are needed please let me know and I'll post it 
  56.             for you.
  57.